# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Michael Kogan <michael dot kogan at gmx dot net>

pkgname=perl-net-dropbox-api
pkgver=1.9
pkgrel=12
pkgdesc="Net::Dropbox::API - Perl dropbox API interface"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/~norbu/Net-Dropbox-API/lib/Net/Dropbox/API.pm"
license=('GPL' 'PerlArtistic')
depends=('perl-common-sense' 'perl-data-random' 'perl-http-message' 'perl-json' 'perl-libwww' 'perl-mouse' 'perl-net-oauth' 'perl-uri' 'perl-lwp-protocol-https')
checkdepends=('perl-test-pod' 'perl-test-pod-coverage')
source=("https://search.cpan.org/CPAN/authors/id/N/NO/NORBU/Net-Dropbox-API-${pkgver}.tar.gz")
sha256sums=('70234bef49201031d0c4b7d474c9192fa39ab297dc4f26a35f6449c16a2ee3a4')

build() {
  cd "$srcdir/Net-Dropbox-API-${pkgver}"
  PERL_USE_UNSAFE_INC=1 \
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "$srcdir/Net-Dropbox-API-${pkgver}"
  make test
}

package() {
  cd "$srcdir/Net-Dropbox-API-${pkgver}"
  make DESTDIR="$pkgdir" install
}
